[mirrors]
http://matt.ucc.asn.au/dropbear/releases/dropbear-2013.60.tar.bz2

[main]
filesize=1584837
sha512=2d9c374f17eef22a783d5fef9f30ee2fcbb8778ff7319bb028d8f6181f49827867e3b7f02eec580cbd48f2d97cad789a541c1fbe43fe3d23f6cb396d4138d712

[deps]
zlib
sshd-service

[build]
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CPPFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE" \
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags || exit 1

# TODO : edit generated options.h

for i in UTMP WTMP PUTUTLINE PUTUTXLINE SYSLOG LASTLOG ; do 
	echo "#define DISABLE_$i" >> config.h
done

make SCPPROGRESS=1 PROGRAMS="dropbear scp dbclient dropbearkey dropbearconvert" \
  prefix="$butch_prefix" sbindir="$butch_prefix"/bin DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS STATIC=1 || exit 1

make SCPPROGRESS=1 PROGRAMS="dropbear scp dbclient dropbearkey dropbearconvert" \
  prefix="$butch_prefix" sbindir="$butch_prefix"/bin DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS install STATIC=1 || exit 1

[ -e "$butch_prefix"/ssh ] || ln -s dbclient "$butch_install_dir""$butch_prefix"/bin/ssh

IS="$K"/bin/install-service
"$IS" --down --log --force dropbear "$K"/services/dropbear
